<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>First Page</title>

    <!-- Sets initial viewport load and disables zooming  -->
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">

    <script type="text/javascript" src="cordova.js"></script>
    <script type="text/javascript" src="jquery-2.0.3.min.js"></script>
    <script type="text/javascript" src="Liger/liger.js"></script>
    <script type="text/javascript" src="Liger/page.js"></script>
    <script type="text/javascript" src="Liger/firstPage.js"></script>
    <script src="lib/ionic/js/ionic.bundle.js"></script>
    <script src="Camera_js/app.js"></script>
    <script src="Camera_js/services.js"></script>
    <script type = "text/javascript" charset = "utf-8">
    function onLoad() {
        alert("LOADED");
    document.addEventListener("deviceready", onDeviceReady, false);
    }
    
    // device APIs are available
    
    function onDeviceReady() {
        alert("DEVIECREADUY---js需要配置信息么");
    window.addEventListener("batterylow", onBatteryLow, false);
    }
    
    //Handle the batterylow event
    
    function onBatteryLow(info) {
    alert("Battery Level Low " + info.level + "%");
    }
    </script>
</head>
<body onload="onLoad()" ng-app="starter" ng-controller="MainCtrl">
    <div id="pages_container"></div>
    

	<h3>Args</h3>
	<div id="args" style="background-color:#CCC; border:1px solid #999;">
	</div>
	<div id="inits">Inits:</div>
	<div id="pageAppear">onPageAppear:</div>

	<h3>Methods</h3>

    <!--
     test设计隐藏域，将图片获取的方式值传入 value = "CAMERA/PHOTOLIBRARY"
     -->
    <input type="hidden" value="CAMERA" id="pictureSource">
    <form style="text-align: center">
		<button id="openPage">Open Second Page</button><br />
		
		<button id="refreshPage">Refresh Page Test</button><br />
		<button id="refreshDialogPage">Refresh Dialog Page Test</button><br />
		<button id="toolbarPage">Toolbar Page Test</button><br />
		<br />
		<button id="openDialog">Open Dialog</button><br />
		<button id="openDialogWithTitle">Open Dialog With Title</button><br />
        <ion-content padding="true">
            <button ng-click="getPhoto()" name = "photo1" class="button button-block button-primary" id = 'takephotoByCamera'>Take Photo</button>
            <button ng-click="getPhoto2()" name = "photo2" class="button button-block button-primary" id = 'takephotoByLibrary'>Get Photo</button>
            <img ng-src="{{lastPhoto}}" style="max-width: 100%">
        </ion-content>
	</form>
    <script>
        //alert("sdsd");
        FIRSTPAGE.initialize();
        </script>
</body>
</html>
